<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<div class="table-responsive">
	<table class="cntable table table-bordered dataTable table-activity ">
		<thead>
			<tr>
				<th style="width: 50px">序号</th>
				<th style="width: 100px">活动名称</th>
				<th style="width: 100px">活动类型</th>
				<th style="width: 100px">活动开始时间</th>
				<th style="width: 100px">活动结束时间</th>
				<th style="width: 100px">活动对象</th>
				<th style="width: 100px">活动奖励</th>
				<th style="width: 100px">活动图片</th>
				<th style="width: 100px">活动状态</th>
				<th style="width: 100px">确认操作</th>
				<th style="width: 100px">确认状态</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="activity" items="${activitys}" varStatus="status">
				<tr data-id="${activity.id}">
					<td>${status.index+1}</td>
					<td>${activity.name}</td>
					<td><t:provider packageName="acti" enumClassName="ActiType" value="${activity.actiType}" /></td>
					<td><fmt:formatDate value="${activity.startDate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><fmt:formatDate value="${activity.endDate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td>${activity.object}</td>
					<td>${activity.reward}
					<t:provider packageName="ser" enumClassName="GoodsCurrencyState" value="${activity.rewardCurrency}" /></td>
					<td style="text-align: center;">
						<c:if test="${activity.actiImg!=null && activity.actiImg!=''}">
							<img style="width:100px; height:80px;" id="smallPicShow" src="${tfn:getFileUrl(activity.actiImg)}" /> 
						</c:if>
						<c:if test="${activity.actiImg==null || activity.actiImg==''}">
							无
						</c:if>
					</td>
					<td><t:provider packageName="acti" enumClassName="ActiState" value="${activity.actiState}" /></td>
					<td><c:if test="${activity.confirmState eq 'unConfirm'}">
							<ul class="icons-list">
								<li>
									<a href="javascript:onConfirm('${activity.id}')" title="点击确认">
										<i class="icon-checkmark-circle2 text-primary"/>
									</a>
								</li>
							</ul>
						</c:if>
					</td>
					<td>
						<c:if test="${activity.confirmState eq 'unConfirm'}">待确认</c:if> 
						<c:if test="${activity.confirmState eq 'confirmed'}">已确认</c:if>
					</td>
				</tr>
			</c:forEach>
		</tbody>
		<tfoot>
			<tr>
				<th class="pager-th absolute-pos">
					<%@ include file="/WEB-INF/views/shared/master/pager.jsp"%>
				</th>
			</tr>
		</tfoot>
	</table>
</div>